home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
How Would You Survive?
/
How Would You Survive (1995)(Grolier)[Mac-PC].iso
/
pc
/
shared.dir
/
01977_Script_aTheatreButton
< prev
next >
Wrap
Text File
|
1995-09-13
|
2KB
|
73 lines
property pSprite,pCast,pNutral,pHilighted,pSelected,pFunction,pMySound,pCursor,¼
pbeenClicked,phelpStatus
on birth me,theSprite,theCast,aSound,aFunction,aCursor
-- assumes that the sprite has the correct cast member in the correct loc
-- assumes that the normal and depressed art are in cast numbers theCast and theCast + 1
set pSprite = theSprite
set pcursor = aCursor
set pCast = theCast
set pMySound = aSound
set pNutral = pCast
set pHilighted = pCast + 1
set pSelected = pCast + 2
set pFunction = aFunction
set phelpStatus = 0
puppetSprite pSprite,TRUE
set the castNum of sprite pSprite = pCast
return me
end
on setNewFunction me, aFunction
set pFunction = aFunction
end
on setNewSound me, aNewSound
set pMySound = aNewSound
end
on TurnOnHelpSound me
set phelpStatus = 1
end
on TurnOffHelpSound me
set phelpStatus = 0
end
on reset me
set the castNum of sprite pSprite = pNutral
updatestage
end
on hilight me
if (rollover(pSprite)) then
if (the castNum of sprite pSprite = pNutral) then
set the castNum of sprite pSprite = pHilighted
Updatestage
end if
if (the mouseDown) then
if (not(the castNum of sprite pSprite = pSelected)) then
puppetsound "FeatureButSplClk.AIFF"
end if
set the castNum of sprite pSprite = pSelected
Updatestage
wait .2
do pFunction
abort
end if
else
reset me
end if
return FALSE
end
on hideControl me
puppetSprite pSprite, FALSE
end
on showControl me
puppetSprite pSprite,TRUE
end